From: Florian Müllner Date: Mon, 17 Jul 2017 19:58:47 +0000 (+0200) Subject: iconGrid: Cancel animations on unmap X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~210 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=865a1cf587feb05c8f55a5baabbc102777519a14;p=gnome-shell.git iconGrid: Cancel animations on unmap We now cancel animations on override, however we also want to cancel animations altogether on unmap (that is, when hiding the overview) to avoid icons swarming into the void. https://bugzilla.gnome.org/show_bug.cgi?id=736148 --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index bd3c453c6..deb91e9a5 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -276,6 +276,13 @@ var IconGrid = new Lang.Class({ this.actor.add(this._grid, { expand: true, y_align: St.Align.START }); this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged)); + // Cancel animations when hiding the overview, to avoid icons + // swarming into the void ... + this.actor.connect('notify::mapped', () => { + if (!this.actor.mapped) + this._cancelAnimation(); + }); + this._grid.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth)); this._grid.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight)); this._grid.connect('allocate', Lang.bind(this, this._allocate));